package com.market.remote;

import com.market.cart.common.domain.CartInfo;
import com.market.common.core.constant.ServiceNameConstants;
import com.market.common.core.domain.Result;
import com.market.remote.factory.RemoteCartServiceFallbackFactory;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

/**
  * @ClassName RemoteCartService
  * @Description 描述
  * @Author ChenDing_ju
  * @Date  22:12 2024/2/28
 */
@FeignClient(contextId = "RemoteCartService",value = ServiceNameConstants.MARKET_SERVICE,fallbackFactory = RemoteCartServiceFallbackFactory.class)
@Service
public interface RemoteCartService {
    /**
     * 添加购物车
     */
    @PostMapping("/cart")
    public Result add(@RequestBody CartInfo cartInfo);
}
